import Vue from 'vue'
import Router from 'vue-router'
import main from '../pages/main/main'
Vue.use(Router)
export const mainRouter = [
  {
    path: '/',
    name: 'home',
    redirect: 'post',
    component: main,
    children: [
      {path: 'post', name: 'postList', component: (resolve) => { require(['../pages/post/postList.vue'], resolve) }}
    ]
  },
  {
    path: '/post/:id',
    name: 'postDetails',
    component: (resolve) => { require(['../pages/post/postDetails.vue'], resolve) }
  }
]
export default new Router({
  routes: [
    ...mainRouter
  ]
})
